/*
 * SimpleTUIOEventHandler.h
 *
 *  Created on: Aug 19, 2010
 *      Author: Ry
 */

#ifndef SIMPLETUIOEVENTHANDLER_H_
#define SIMPLETUIOEVENTHANDLER_H_

#include <list>
#include <gui/GUI.h>
#include <GameWindow.h>
#include <art/ShaderProgram.h>
#include <world/SimpleWorld.h>
#include <world/Object.h>
#include <mesh/Mesh.h>
#include <math/Plane.h>

#include "Cursor.h"
#include "TUIOEventHandler.h"
#include "BuilderMotionController.h"

class SimpleTUIOEventHandler: public TUIOEventHandler {
private:
	GUI *gui;
	GameWindow *window;
	ShaderProgram *shaderProgram;
	std::vector<Cursor*> *cursors;

	Object *player;
	Object *building;
	SimpleWorld *world;
	std::vector<Mesh*> buildingMeshes;
	Vector3 buildPosition;
	Plane ground;
	BuilderMotionController *motionController;

public:
	SimpleTUIOEventHandler(GUI *gui, GameWindow *window,
			ShaderProgram *shaderProgram, std::vector<Cursor*> *cursors,
			Object *player, SimpleWorld *world,
			std::vector<Mesh*> buildingMeshes);
	void handleEvent(float dts);
	virtual ~SimpleTUIOEventHandler();
};

#endif /* SIMPLETUIOEVENTHANDLER_H_ */
